/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "client_trans_proxy_manager.h"

#include "softbus_errcode.h"
#include "softbus_log.h"

void ClinetTransProxyFileManagerDeinit(void)
{
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "Clinet Trans Proxy File Manager Deinit(virtual).");
}

int32_t ClientTransProxyInit(const IClientSessionCallBack *cb)
{
    (void *)cb;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "Client Trans Proxy Init(virtual).");
    return SOFTBUS_OK;
}

void ClientTransProxyDeinit(void)
{
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "Client Trans Proxy Deinit(virtual).");
}

int32_t ClientTransProxyGetInfoByChannelId(int32_t channelId, ProxyChannelInfoDetail *info)
{
    (void *)info;
    (void)channelId;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyGetInfoByChannelId(virtual)");
    return SOFTBUS_ERR;
}

int32_t ClientTransProxyAddChannelInfo(ClientProxyChannelInfo *info)
{
    (void *)info;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyAddChannelInfo(virtual)");
    return SOFTBUS_OK;
}

int32_t ClientTransProxyDelChannelInfo(int32_t channelId)
{
    (void)channelId;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyDelChannelInfo(virtual)");
    return SOFTBUS_OK;
}

NO_SANITIZE("cfi") int32_t ClientTransProxyOnChannelOpened(const char *sessionName, const ChannelInfo *channel)
{
    (void)sessionName;
    (void)channel;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyOnChannelOpened(virtual)");
    return SOFTBUS_OK;
}

int32_t TransProxyDelSliceProcessorByChannelId(int32_t channelId);

NO_SANITIZE("cfi") int32_t ClientTransProxyOnChannelClosed(int32_t channelId)
{
    (void)channelId;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyOnChannelClosed(virtual)");
    return SOFTBUS_OK;
}

NO_SANITIZE("cfi") int32_t ClientTransProxyOnChannelOpenFailed(int32_t channelId, int32_t errCode)
{
    (void)channelId;
    (void)errCode;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyOnChannelOpenFailed(virtual)");
    return SOFTBUS_OK;
}

int32_t TransProxyDelSliceProcessorByChannelId(int32_t channelId)
{
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "TransProxyDelSliceProcessorByChannelId(virtual)");
    return SOFTBUS_OK;
}

NO_SANITIZE("cfi") int32_t ClientTransProxyOnDataReceived(int32_t channelId,
    const void *data, uint32_t len, SessionPktType type)
{
    (void *)data;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "TransProxyPackAndSendData(virtual)");
    return SOFTBUS_OK;
}

void ClientTransProxyCloseChannel(int32_t channelId)
{
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ClientTransProxyCloseChannel(virtual)");
}

int32_t TransProxyPackAndSendData(int32_t channelId, const void *data, uint32_t len,
    ProxyChannelInfoDetail* info, SessionPktType pktType)
{
    (void *)info;
    (void *)data;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "TransProxyPackAndSendData(virtual)");
    return SOFTBUS_OK;
}

int32_t TransProxyChannelSendBytes(int32_t channelId, const void *data, uint32_t len)
{
    (void *)data;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "TransProxyChannelSendBytes(virtual)");
    return SOFTBUS_OK;
}

int32_t TransProxyChannelSendMessage(int32_t channelId, const void *data, uint32_t len)
{
    (void *)data;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "TransProxyChannelSendMessage(virtual)");
    return SOFTBUS_OK;
}

int32_t ProcessFileFrameData(int32_t sessionId, int32_t channelId, const char *data, uint32_t len, int32_t type)
{
    (void *)data;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "ProcessFileFrameData(virtual)");
    return SOFTBUS_OK;
}

static const char **GenerateRemoteFiles(const char *sFileList[], uint32_t fileCnt)
{
    (void *)sFileList;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "GenerateRemoteFiles(virtual)");
    return SOFTBUS_OK;
}

int32_t TransProxyChannelSendFile(int32_t channelId, const char *sFileList[], const char *dFileList[], uint32_t fileCnt)
{
    (void *)sFileList;
    (void *)dFileList;
    SoftBusLog(SOFTBUS_LOG_TRAN, SOFTBUS_LOG_INFO, "TransProxyChannelSendFile(virtual)");
    return SOFTBUS_OK;
}